package com.shardingjdbc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;

@TableName("t_order")  //逻辑表名
@Data
public class Order {
    //当配置了sharding sphere-jdbc  的分布式序列时自动使用shardingsphere-idbc的分布式序列
    @TableId(type = IdType.AUTO)
    //@TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private String orderNo;
    private Object userId;
    private BigDecimal amount;
}